
package edu.gatech.cc.liam.core.rl.models.stochasticgame;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Set;

import edu.gatech.cc.liam.core.DiscreteDistribution;
import edu.gatech.cc.liam.core.rl.models.Action;

public abstract class AbstractTransitionFunction<StateType> implements Serializable{
	
	private static final long serialVersionUID = 3759610272375012873L;

	public abstract DiscreteDistribution<StateType> TransitionDistribution(StateType oldState, ArrayList<Action> a);
	
	public abstract double TransitionProb(StateType oldState, ArrayList<Action> a, StateType newState);

	public StateType apply(StateType oldState, ArrayList<Action> action) {
		return TransitionDistribution(oldState, action).sample();
	}
	
	public abstract Set<StateType> getStates();
	
	public abstract int getNumberOfPlayers();
	
}
